<!--
*Author：富行天下团队
 
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/Distributor/DistributorSystem.js此处编写
 -->
<template>
  <div>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormFileds="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormFileds="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
  </div>
</template>

<script>
import extend from "@/extension/Distributor/DistributorSystem.js";
import ViewGrid from "@/components/basic/ViewGrid.vue";
var vueParam = {
  components: {
    ViewGrid
  },
  data () {
    return {
      table: {
        key: 'id',
        footer: "Foots",
        cnName: '渠道参数配置',
        name: 'DistributorSystem',
        url: "/DistributorSystem/",
        sortName: "createDate"
      },
      extend: extend,
      editFormFields: { "distributorName": '', "distributorCode": '', "systemParams": '', "createDate": '', "creator": '', "modifier": '', "modifyDate": '',"systemUrl":"" },
      editFormOptions: [[
        { "title": "品牌名称", "field": "distributorName", "type": "text", "required": true, },
        { "title": "品牌编码", "field": "distributorCode", "type": "text", "required": true, }
      ], [{ "dataKey": "distributorParams", "data": [], "title": "多选参数", "field": "systemParams", "type": "selectList", "colSize": 12, }],
      [{ "title": "渠道url", "field": "systemUrl", "type": "text", "colSize": 12,}]
      ],
      searchFormFields: {"distributorName":""},
      searchFormOptions: [[{"title": "品牌名称", "field": "distributorName", "type": "like" }]],
      columns: [{ field: 'createDate', title: '创建时间', type: 'datetime', width: 90, align: 'left', sortable: true },
      { field: 'createID', title: '创建人ID', type: 'int', width: 90, hidden: true, align: 'left' },
      { field: 'creator', title: '创建人', type: 'string', width: 180, align: 'left' },
      { field: 'distributorCode', title: '品牌编码', type: 'string', width: 220, align: 'left' },
      { field: 'distributorName', title: '品牌名称', type: 'string', width: 220, align: 'left' },
      { field: 'id', title: '主键', type: 'int', width: 90, hidden: true, readonly: true, require: true, align: 'left' },
      { field: 'modifier', title: '修改人', type: 'string', width: 180, align: 'left' },
      { field: 'modifyDate', title: '修改时间', type: 'datetime', width: 90, align: 'left', sortable: true },
      { field: 'modifyID', title: '修改人ID', type: 'int', width: 90, hidden: true, align: 'left' },
      { field: 'systemParams', title: '多选参数', type: 'string', width: 220, align: 'left' },
      { field: 'systemUrl', title: '渠道url', type: 'string', width: 220, align: 'left' },
      ],
      detail: {
        cnName: "渠道接口列表",
        columns: [
          { field: 'distributorId', title: '渠道id', type: 'int', width: 90, align: 'left', hidden: true, },
          { field: 'interfaceid', title: '主键', type: 'int', width: 90, hidden: true, readonly: true, require: true, align: 'left' },
          { field: 'interfaceUrl', title: '请求地址（全部）', type: 'string', edit: { type: '' }, width: 120, align: 'left' },
          { field: 'interfaceRequestParam', title: '参数', type: 'string', edit: { type: '' }, width: 90, align: 'left' },
          { field: 'interfaceType', title: '接口类型', type: 'string', bind: { key: 'InterfaceType', data: [] }, edit: { type: 'select' }, width: 120, align: 'left' },

        ],
        sortName: "interfaceid",
        key: "interfaceid",
      }
    };
  }
};
export default vueParam;
</script>
